Jupyter at Bryn Mawr College |
|||
Public notebooks: /services/public/dblank / jupyter.cs / Examples |
This notebook describes an alternative Bibtex tool that differs from other Jupyter/IPython extensions:
The main differences:
sudo ipython install-nbextension https://bitbucket.org/ipre/calico/downloads/calico-document-tools-1.0.zip
At some point after installing, you need to load the nbextension:
IPython.load_extensions('calico-document-tools');
That will add the "Generate References" button (and others as well---see Futher Information below).
First, one can include Bibtex entries any where in a notebook. I put them at the end.
The Bibtex database is in a Markdown cell, as a HTML-comment (with "bibtex") marked as follows:
<!--bibtex
@Article{PER-GRA:2007,
Author = {P\'erez, Fernando and Granger, Brian E.},
Title = {{IP}ython: a System for Interactive Scientific Computing},
Journal = {Computing in Science and Engineering},
Volume = {9},
Number = {3},
Pages = {21--29},
month = may,
year = 2007,
url = "http://ipython.org",
ISSN = "1521-9615",
doi = {10.1109/MCSE.2007.53},
publisher = {IEEE Computer Society},
}
... Other Bibtex entries go here.
-->
Next, you can reference the Bibtex item in Markdown cells using this format:
[cite](#cite-BIBTEX_LABEL)
where BIBTEX_LABEL
would be something like PER-GRA:2007
.
You would write:
Thus, if you want to cite IPython, then you could use that citation [cite](#cite-PER-GRA:2007)
That won't look like a real citation until you render the References by pressing the "Generate References" button. It then becomes:
Thus, if you want to cite IPython, then you could use that citation <a name="ref-1"/>[(Pérez and Granger, 2007)](#cite-PER-GRA:2007)
It will automatically do the following:
Here is the real markdown:
Thus, if you want to cite IPython, then you could use that citation (Pérez and Granger, 2007)
In addition to having the bibliography information stored directly in a notebook (which is highly preferred for reproducible research) you can also create a Bibliography.ipynb in this directory, or a parent directory. See below for further information.
[^](#ref-1) Pérez, Fernando and Granger, Brian E.. 2007. IPython: a System for Interactive Scientific Computing.